<?php
$cs=Yii::app()->clientScript;
$cs->registerCssFile(Yii::app()->params->cssBaseUrl.'/themes/kitchen.css','screen');
$cs->registerCssFile(Yii::app()->params->cssBaseUrl.'/themes/recipe.css','screen');
?>

<div class="main650" id="main">
  <div id="main-cont-top-650"></div>
  <div id="one-col">
    <div id="recipe-post">
        
    <div class="form">
    
    <div class="">
      <h1 style="font-size: 21px; margin-bottom: 20px;">
        创建新食谱
      </h1>

      <?php echo CHtml::beginForm('','post',array('enctype'=>'multipart/form-data')); ?>
      <?php echo CHtml::errorSummary($recipe,null,null,array('class'=>'alert')); ?>

      <div class="cont-wrapper">
        <div style="width: 500px; float: left;">
          <h3 class="title">
            <?php echo CHtml::activeLabel($recipe,'title',array('class'=>'mid')); ?>
          </h3>
          <?php echo CHtml::activeTextField($recipe,'title',array('size'=>40,'style'=>'padding: 3px; width: 400px;','class'=>'mid')); ?>
        </div>
        <div class="clear"></div>
      </div>

      <div class="cont-wrapper">
        <div style="">
          <h3 class="title">
            <?php echo CHtml::activeLabel($recipe,'description',array('class'=>'mid')); ?>
          </h3>
          <?php echo CHtml::activeTextArea($recipe,'description',array('size'=>40,'style'=>'padding: 3px; font-size: 12px; color: rgb(153, 153, 153); line-height: 130%; width: 400px; height: 80px;','class'=>'mid')); ?>
        </div>
        <div class="clear"></div>     
      </div>

      <div class="cont-wrapper">
        <div style="">
          <h3 title="" class="">
            <?php echo CHtml::activeLabel($recipe,'image',array('class'=>'mid')); ?>
          </h3>
          <?php echo CHtml::activeFileField($recipe,'image',array('size'=>40)); ?>
          <div style="margin-top: 10px;" class="notice">
            ※宽度将会被自动调整为280px
          </div>
        </div>
        <div class="clear"></div>
      </div>

      <div style="text-align: center; margin-top: 20px; font-size: 21px;" class="submit">
        <?php echo CHtml::submitButton('创建'); ?>
      </div>

      <?php echo CHtml::endForm(); ?>
    </div>
    </div><!--/form-->
    </div><!--/recipe-post-->  
  </div>
  <div class="clear"></div>
  <div id="main-cont-bottom-650"></div>
</div>